# -*- coding: utf-8 -*-
<body scroll="no">

<div id="x-desktop">
    <a href="http://extjs.com" target="_blank" style="margin:5px; float:right;"><img src="images/powered.gif" /></a>

    <dl id="x-shortcuts">
        <dt id="grid-win-shortcut">
            <a href="#"><img src="/toscawidgets/resources/toscawidgets.widgets.extJS.core/static/desktop/images/s.gif" />
            <div>Grid Window</div></a>
        </dt>
        <dt id="acc-win-shortcut">
            <a href="#"><img src="/toscawidgets/resources/toscawidgets.widgets.extJS.core/static/desktop/images/s.gif" />
            <div>Accordion Window</div></a>
        </dt>
    </dl>
</div>   
<!--
	<div id="dialog" class="x-hidden">
	    <div class="x-window-header">2.0 Layout Dialog</div>
	    <div id="west" class="x-hidden">
	        West
	    </div>
	    <div id="center" class="x-hidden">
	        A cool layout dialog from markup!
		</div>
	</div>
-->
<div id="ux-taskbar">
	<div id="ux-taskbar-start"></div>
	<div id="ux-taskbuttons-panel"></div>
	<div class="x-clear"></div>
</div>

<script>
	// Sample desktop configuration
	
   	
	MyDesktop = new Ext.app.App({
		init :function(){
			Ext.QuickTips.init();
			
			// turn on validation errors beside the field globally
			Ext.form.Field.prototype.msgTarget = 'side';
			  			
		},
	
		getModules : function(){
			return [
			<% sep='' %>
			%for module in modules:
				${sep}new MyDesktop.${module.componentId}() 
				<% sep=',' %>
			%endfor
			];
		},
	
	    // config for the start menu
	    getStartConfig : function(){
	        return {
	            title: '${title}',
	            iconCls: 'user',
	            toolItems: [{
	                text:'Settings',
	                iconCls:'settings',
	                scope:this
	            },'-',{
	                text:'Logout',
	                iconCls:'logout',
	                scope:this
	            }]
	        };
	    }
	});
	
	// end of application
	
	%for module in modules:
		${ module.display(value_for(module), **args_for(module)) } 
	%endfor

</script>

</body>